import { Login, Logout } from "./login";

export default function httpStatusNavigateTo (status) {
	const store = require('@/store/index').default;
	const statusMap = {
		203:()=>{
			uni.navigateTo({
				url: '/pages/login/index'
			});
		},
		403:()=>{
			uni.$tn.message.modal("提示", "请进行登录后再操作", () => {
			  Logout();
			  Login();
			}, true, 
			() => {
				Logout();
				uni.navigateTo({
					url: '/pages/person/person'
				});
			}, "立即登录", "取消")
		}
	}
	console.log("status",status);
	statusMap[status]();
}